package com.firexxx.study.anonymousandinnerclass;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * TODO
 *
 * @author fireXXX
 * @date 2020/12/8 0:46
 **/
public class Outer {

    static class Inner {
        void use() {
            a = 2;
            System.out.println(1);
        }
    }

    private static int a = 1;

    public static void main(String[] args) {
        int[] b = new int[1];
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                b[0] = 2;
                System.out.println(2);
            }
        };

        Inner inner = new Inner();
        inner.use();

        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        list = list.stream().map(item -> {
            return item + "2";
        }).collect(Collectors.toList());

        int bb = 1;
    }

}